package com.mindao.app.weixin.demo;

import org.springframework.stereotype.Component;

import com.mindao.app.ea.demo.InfDemo;
import com.mindao.app.ea.demo.ParentDemo;
import com.mindao.app.weixin.model.WxmpButton;

/**
/* 版权所有： 广州敏道科技有限公司
/*
/* 功能描述：
/*
/* 创 建 人：李国才
/* 创建时间：2016年7月17日 下午6:53:07 	
 **/
@Component("ImpEaMindao")
public class ImpEaMinDao  extends ParentDemo implements InfDemo{

	@Override
	public void initData() throws Exception {
		// TODO Auto-generated method stub
		//用户初始化
		if(baseDao.find(" from WxmpButton ").size()==0){
			WxmpButton p1=new WxmpButton( "公司简介",10L);
			baseDao.create(p1);
			WxmpButton c11=new WxmpButton(WxmpButton.TYPE_VIEW, "门户网站", null, "http://www.amindao.com",null, 10L, p1);
			baseDao.create(c11);
			WxmpButton c12=new WxmpButton(WxmpButton.TYPE_VIEW, "公司地址", null, "http://www.amindao.com/train/site/page/address_1.html",null, 20L, p1);
			baseDao.create(c12);
			WxmpButton c13=new WxmpButton(WxmpButton.TYPE_LOCATION_SEELCT, "参观导航", null, null,null, 30L, p1);
			baseDao.create(c13);
			
			WxmpButton p2=new WxmpButton( "业务案例",20L);
			baseDao.create(p2);
			WxmpButton c21=new WxmpButton(WxmpButton.TYPE_CLICK, "企业信息化案例", "MdErpCase", null,null, 10L, p2);
			baseDao.create(c21);
			WxmpButton c22=new WxmpButton(WxmpButton.TYPE_CLICK, "互联网+案例", "MdInternetCase", null,null, 20L, p2);
			baseDao.create(c22);
			WxmpButton c23=new WxmpButton(WxmpButton.TYPE_CLICK, "企业咨询案例", "MdTrainCase", null,null, 30L, p2);
			baseDao.create(c23);
			
			WxmpButton c31=new WxmpButton(WxmpButton.TYPE_VIEW, "活动报名", null, "http://www.amindao.com/site/site/event/eventEnroll.do?uuid=0c40cecf1ccb415e9a4bcd0587e67564",null, 30L, null);
			baseDao.create(c31);
		}
	}

	@Override
	public void testData() throws Exception {
		// TODO Auto-generated method stub
		
	}
}
